Changeset 3917
- Timestamp:
- 09/12/2006 01:39:02 AM (3 years ago)
- Files:
-
- src/linux/brcm/linux.v24/.config (modified) (1 diff)
- src/linux/brcm/linux.v24/.config_std (modified) (2 diffs)
- src/linux/brcm/linux.v24/Makefile (modified) (2 diffs)
- src/linux/brcm/linux.v24/crypto/cipher.c (modified) (6 diffs)
- src/linux/brcm/linux.v24/drivers/block/cciss_scsi.c (modified) (2 diffs)
- src/linux/brcm/linux.v24/drivers/block/loop.c (modified) (1 diff)
- src/linux/brcm/linux.v24/drivers/net/wireless/wlcompat.c (modified) (9 diffs)
- src/linux/brcm/linux.v24/drivers/scsi/sg.c (modified) (1 diff)
- src/linux/brcm/linux.v24/fs/binfmt_elf.c (modified) (5 diffs)
- src/linux/brcm/linux.v24/fs/partitions/sun.c (modified) (1 diff)
- src/linux/brcm/linux.v24/fs/udf/super.c (modified) (1 diff)
- src/linux/brcm/linux.v24/fs/udf/truncate.c (modified) (1 diff)
- src/linux/brcm/linux.v24/include/net/sctp/sctp.h (modified) (1 diff)
- src/linux/brcm/linux.v24/include/net/sctp/sm.h (modified) (1 diff)
- src/linux/brcm/linux.v24/kernel/ksyms.c (modified) (1 diff)
- src/linux/brcm/linux.v24/net/sctp/sm_make_chunk.c (modified) (2 diffs)
- src/linux/brcm/linux.v24/net/sctp/sm_statefuns.c (modified) (3 diffs)
- src/linux/brcm/linux.v24/net/sctp/socket.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/linux/brcm/linux.v24/.config
r3658 r3917 763 763 # Watchdog Cards 764 764 # 765 # CONFIG_WATCHDOG is not set 765 CONFIG_WATCHDOG=y 766 # CONFIG_WATCHDOG_NOWAYOUT is not set 767 # CONFIG_ACQUIRE_WDT is not set 768 # CONFIG_ADVANTECH_WDT is not set 769 # CONFIG_ALIM1535_WDT is not set 770 # CONFIG_ALIM7101_WDT is not set 771 # CONFIG_SC520_WDT is not set 772 # CONFIG_PCWATCHDOG is not set 773 # CONFIG_EUROTECH_WDT is not set 774 # CONFIG_IB700_WDT is not set 775 # CONFIG_WAFER_WDT is not set 776 # CONFIG_I810_TCO is not set 777 # CONFIG_MIXCOMWD is not set 778 # CONFIG_60XX_WDT is not set 779 # CONFIG_SC1200_WDT is not set 780 # CONFIG_SCx200_WDT is not set 781 CONFIG_SOFT_WATCHDOG=y 782 # CONFIG_W83877F_WDT is not set 783 # CONFIG_WDT is not set 784 # CONFIG_WDTPCI is not set 785 # CONFIG_MACHZ_WDT is not set 766 786 # CONFIG_SCx200 is not set 767 787 # CONFIG_SCx200_GPIO is not set src/linux/brcm/linux.v24/.config_std
r3046 r3917 322 322 # CONFIG_IP_PNP is not set 323 323 CONFIG_NET_IPIP=m 324 CONFIG_NET_IPWCCP=m 324 325 CONFIG_NET_IPGRE=m 325 326 # CONFIG_NET_IPGRE_BROADCAST is not set … … 762 763 # Watchdog Cards 763 764 # 764 # CONFIG_WATCHDOG is not set 765 CONFIG_WATCHDOG=y 766 # CONFIG_WATCHDOG_NOWAYOUT is not set 767 # CONFIG_ACQUIRE_WDT is not set 768 # CONFIG_ADVANTECH_WDT is not set 769 # CONFIG_ALIM1535_WDT is not set 770 # CONFIG_ALIM7101_WDT is not set 771 # CONFIG_SC520_WDT is not set 772 # CONFIG_PCWATCHDOG is not set 773 # CONFIG_EUROTECH_WDT is not set 774 # CONFIG_IB700_WDT is not set 775 # CONFIG_WAFER_WDT is not set 776 # CONFIG_I810_TCO is not set 777 # CONFIG_MIXCOMWD is not set 778 # CONFIG_60XX_WDT is not set 779 # CONFIG_SC1200_WDT is not set 780 # CONFIG_SCx200_WDT is not set 781 CONFIG_SOFT_WATCHDOG=y 782 # CONFIG_W83877F_WDT is not set 783 # CONFIG_WDT is not set 784 # CONFIG_WDTPCI is not set 785 # CONFIG_MACHZ_WDT is not set 765 786 # CONFIG_SCx200 is not set 766 787 # CONFIG_SCx200_GPIO is not set src/linux/brcm/linux.v24/Makefile
r3658 r3917 2 2 PATCHLEVEL = 4 3 3 SUBLEVEL = 34 4 EXTRAVERSION = -pre 14 EXTRAVERSION = -pre2 5 5 6 6 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) … … 104 104 105 105 CFLAGS += $(call check_gcc, -funit-at-a-time,) 106 CFLAGS += -fno-delayed-branch106 #CFLAGS += -fno-delayed-branch 107 107 #CFLAGS += $(call check_gcc, -fno-delayed-branch) 108 108 src/linux/brcm/linux.v24/crypto/cipher.c
r2726 r3917 148 148 } 149 149 150 static int ecb_encrypt_iv(struct crypto_tfm *tfm, 151 struct scatterlist *dst, 152 struct scatterlist *src, 153 unsigned int nbytes, u8 *iv) 154 { 155 ecb_encrypt(tfm, dst, src, nbytes); 156 return -ENOSYS; 157 } 158 150 159 static int ecb_decrypt(struct crypto_tfm *tfm, 151 160 struct scatterlist *dst, … … 158 167 } 159 168 169 static int ecb_decrypt_iv(struct crypto_tfm *tfm, 170 struct scatterlist *dst, 171 struct scatterlist *src, 172 unsigned int nbytes, u8 *iv) 173 { 174 ecb_decrypt(tfm, dst, src, nbytes); 175 return -ENOSYS; 176 } 177 160 178 static int cbc_encrypt(struct crypto_tfm *tfm, 161 179 struct scatterlist *dst, … … 198 216 } 199 217 218 /* 219 * nocrypt*() zeroize the destination buffer to make sure we don't leak 220 * uninitialized memory contents if the caller ignores the return value. 221 * This is bad since the data in the source buffer is unused and may be 222 * lost, but an infoleak would be even worse. The performance cost of 223 * memset() is irrelevant since a well-behaved caller would not bump into 224 * the error repeatedly. 225 */ 200 226 static int nocrypt(struct crypto_tfm *tfm, 201 227 struct scatterlist *dst, … … 203 229 unsigned int nbytes) 204 230 { 231 memset(dst, 0, nbytes); 205 232 return -ENOSYS; 206 233 } … … 211 238 unsigned int nbytes, u8 *iv) 212 239 { 240 memset(dst, 0, nbytes); 213 241 return -ENOSYS; 214 242 } … … 236 264 ops->cit_encrypt = ecb_encrypt; 237 265 ops->cit_decrypt = ecb_decrypt; 266 /* These should have been nocrypt_iv, but patch-cryptoloop-jari-2.4.22.0 267 * (and its other revisions) directly calls the *_iv() functions even in 268 * ECB mode and ignores their return value. */ 269 ops->cit_encrypt_iv = ecb_encrypt_iv; 270 ops->cit_decrypt_iv = ecb_decrypt_iv; 238 271 break; 239 272 src/linux/brcm/linux.v24/drivers/block/cciss_scsi.c
r2726 r3917 50 50 51 51 52 int __initcciss_scsi_detect(Scsi_Host_Template *tpnt);52 int cciss_scsi_detect(Scsi_Host_Template *tpnt); 53 53 int cciss_scsi_release(struct Scsi_Host *sh); 54 54 const char *cciss_scsi_info(struct Scsi_Host *sa); … … 778 778 called from cciss.c:cciss_init_one(). */ 779 779 780 int __init780 int 781 781 cciss_scsi_detect(Scsi_Host_Template *tpnt) 782 782 { src/linux/brcm/linux.v24/drivers/block/loop.c
r2726 r3917 694 694 695 695 lo->lo_bh = lo->lo_bhtail = NULL; 696 kernel_thread(loop_thread, lo, CLONE_FS | CLONE_FILES | CLONE_SIGHAND); 697 down(&lo->lo_sem); 696 error = kernel_thread(loop_thread, lo, 697 CLONE_FS | CLONE_FILES | CLONE_SIGHAND); 698 if (error < 0) 699 goto out_clr; 700 down(&lo->lo_sem); /* wait for the thread to start */ 698 701 699 702 fput(file); 700 703 return 0; 701 704 705 out_clr: 706 lo->lo_backing_file = NULL; 707 lo->lo_device = 0; 708 lo->lo_flags = 0; 709 loop_sizes[lo->lo_number] = 0; 710 inode->i_mapping->gfp_mask = lo->old_gfp_mask; 711 lo->lo_state = Lo_unbound; 712 fput(file); /* yes, have to do it twice */ 702 713 out_putf: 703 714 fput(file); src/linux/brcm/linux.v24/drivers/net/wireless/wlcompat.c
r2726 r3917 19 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 20 * 21 * $Id: wlcompat.c 2529 2005-11-19 01:07:28Z nbd $21 * $Id: wlcompat.c 4735 2006-09-03 04:54:21Z nbd $ 22 22 */ 23 23 … … 25 25 #include <linux/config.h> 26 26 #include <linux/module.h> 27 #include <linux/moduleparam.h> 27 28 #include <linux/init.h> 28 29 #include <linux/if_arp.h> 29 30 #include <asm/uaccess.h> 30 31 #include <linux/wireless.h> 32 #include <linux/timer.h> 31 33 32 34 #include <net/iw_handler.h> … … 36 38 static unsigned short bss_force; 37 39 static struct iw_statistics wstats; 40 static int random = 1; 38 41 char buf[WLC_IOCTL_MAXLEN]; 39 42 … … 44 47 }; 45 48 #define NUM_CHANNELS ( sizeof(channel_frequency) / sizeof(channel_frequency[0]) ) 49 50 #define RNG_POLL_FREQ 20 46 51 47 52 typedef struct internal_wsec_key { … … 978 983 } 979 984 985 static struct timer_list rng_timer; 986 987 static void rng_timer_tick(unsigned long n) 988 { 989 struct net_device *dev = (struct net_device *) n; 990 u16 data[4]; 991 int i, ret; 992 993 ret = 0; 994 for (i = 0; i < 3; i++) { 995 ret |= wl_get_val(dev, "rand", &data[i], sizeof(u16)); 996 } 997 if (!ret) 998 batch_entropy_store(*((u32 *) &data[0]), *((u32 *) &data[2]), (jiffies % 255)); 999 1000 mod_timer(&rng_timer, jiffies + (HZ/RNG_POLL_FREQ)); 1001 } 1002 1003 980 1004 static int __init wlcompat_init() 981 1005 { 982 1006 int found = 0, i; 983 char *devname = "eth0";1007 char devname[4] = "wl0"; 984 1008 bss_force = 0; 985 1009 … … 987 1011 if ((dev->wireless_handlers == NULL) && ((wl_ioctl(dev, WLC_GET_MAGIC, &i, sizeof(i)) == 0) && i == WLC_IOCTL_MAGIC)) 988 1012 found = 1; 989 devname[ 3]++;1013 devname[2]++; 990 1014 } 991 1015 … … 1000 1024 dev->wireless_handlers = (struct iw_handler_def *)&wlcompat_handler_def; 1001 1025 dev->get_wireless_stats = wlcompat_get_wireless_stats; 1026 1027 if (random) { 1028 init_timer(&rng_timer); 1029 rng_timer.function = rng_timer_tick; 1030 rng_timer.data = (unsigned long) dev; 1031 rng_timer_tick((unsigned long) dev); 1032 } 1033 1002 1034 #ifdef DEBUG 1003 1035 printk("broadcom driver private data: 0x%08x\n", dev->priv); … … 1008 1040 static void __exit wlcompat_exit() 1009 1041 { 1042 if (random) 1043 del_timer(&rng_timer); 1010 1044 dev->get_wireless_stats = NULL; 1011 1045 dev->wireless_handlers = NULL; … … 1018 1052 MODULE_LICENSE("GPL"); 1019 1053 1054 module_param(random, int, 0); 1020 1055 module_init(wlcompat_init); 1021 1056 module_exit(wlcompat_exit); src/linux/brcm/linux.v24/drivers/scsi/sg.c
r2726 r3917 1193 1193 sfp->mmap_called = 1; 1194 1194 } 1195 vma->vm_flags |= (VM_RESERVED | VM_IO);1195 vma->vm_flags |= VM_RESERVED; 1196 1196 vma->vm_private_data = sfp; 1197 1197 vma->vm_ops = &sg_mmap_vm_ops; src/linux/brcm/linux.v24/fs/binfmt_elf.c
r2726 r3917 87 87 }; 88 88 89 #define BAD_ADDR(x) ((unsigned long)(x) > TASK_SIZE)89 #define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE) 90 90 91 91 static int set_brk(unsigned long start, unsigned long end) … … 355 355 */ 356 356 k = load_addr + eppnt->p_vaddr; 357 if ( k > TASK_SIZE|| eppnt->p_filesz > eppnt->p_memsz ||357 if (BAD_ADDR(k) || eppnt->p_filesz > eppnt->p_memsz || 358 358 eppnt->p_memsz > TASK_SIZE || TASK_SIZE - eppnt->p_memsz < k) { 359 359 error = -ENOMEM; … … 799 799 * <= p_memsz so it is only necessary to check p_memsz. 800 800 */ 801 if ( k > TASK_SIZE|| elf_ppnt->p_filesz > elf_ppnt->p_memsz ||801 if (BAD_ADDR(k) || elf_ppnt->p_filesz > elf_ppnt->p_memsz || 802 802 elf_ppnt->p_memsz > TASK_SIZE || 803 803 TASK_SIZE - elf_ppnt->p_memsz < k) { … … 851 851 &interp_load_addr); 852 852 if (BAD_ADDR(elf_entry)) { 853 printk(KERN_ERR "Unable to load interpreter %.128s\n", 854 elf_interpreter); 853 // FIXME - ratelimit this before re-enabling 854 // printk(KERN_ERR "Unable to load interpreter %.128s\n", 855 // elf_interpreter); 856 855 857 force_sig(SIGSEGV, current); 856 retval = IS_ERR((void *)elf_entry) ? PTR_ERR((void *)elf_entry) : -ENOEXEC; 858 retval = IS_ERR((void *)elf_entry) ? 859 (int)elf_entry : -EINVAL; 857 860 goto out_free_dentry; 858 861 } … … 862 865 fput(interpreter); 863 866 kfree(elf_interpreter); 867 } else { 868 if (BAD_ADDR(elf_entry)) { 869 force_sig(SIGSEGV, current); 870 retval = -EINVAL; 871 goto out_free_dentry; 872 } 864 873 } 865 874 src/linux/brcm/linux.v24/fs/partitions/sun.c
r2726 r3917 87 87 for (i = 0; i < 8; i++, p++) { 88 88 unsigned long st_sector; 89 int num_sectors;89 unsigned int num_sectors; 90 90 91 91 st_sector = first_sector + be32_to_cpu(p->start_cylinder) * spc; src/linux/brcm/linux.v24/fs/udf/super.c
r2726 r3917 1516 1516 goto error_out; 1517 1517 } 1518 sb->s_maxbytes = MAX_LFS_FILESIZE;1518 sb->s_maxbytes = 1<<30; 1519 1519 return sb; 1520 1520 src/linux/brcm/linux.v24/fs/udf/truncate.c
r2726 r3917 183 183 if (offset) 184 184 { 185 extoffset -= adsize; 186 etype = udf_next_aext(inode, &bloc, &extoffset, &eloc, &elen, &bh, 1); 187 if (etype == (EXT_NOT_RECORDED_NOT_ALLOCATED >> 30)) 188 { 189 extoffset -= adsize; 190 elen = EXT_NOT_RECORDED_NOT_ALLOCATED | (elen + offset); 191 udf_write_aext(inode, bloc, &extoffset, eloc, elen, bh, 0); 192 } 193 else if (etype == (EXT_NOT_RECORDED_ALLOCATED >> 30)) 194 { 195 lb_addr neloc = { 0, 0 }; 196 extoffset -= adsize; 197 nelen = EXT_NOT_RECORDED_NOT_ALLOCATED | 198 ((elen + offset + inode->i_sb->s_blocksize - 1) & 199 ~(inode->i_sb->s_blocksize - 1)); 200 udf_write_aext(inode, bloc, &extoffset, neloc, nelen, bh, 1); 201 udf_add_aext(inode, &bloc, &extoffset, eloc, (etype << 30) | elen, &bh, 1); 202 } 203 else 204 { 205 if (elen & (inode->i_sb->s_blocksize - 1)) 206 { 207 extoffset -= adsize; 208 elen = EXT_RECORDED_ALLOCATED | 209 ((elen + inode->i_sb->s_blocksize - 1) & 210 ~(inode->i_sb->s_blocksize - 1)); 211 udf_write_aext(inode, bloc, &extoffset, eloc, elen, bh, 1); 212 } 185 /* 186 * OK, there is not extent covering inode->i_size and 187 * no extent above inode->i_size => truncate is 188 * extending the file by 'offset'. 189 */ 190 if ((!bh && extoffset == udf_file_entry_alloc_offset(inode)) || 191 (bh && extoffset == sizeof(struct allocExtDesc))) { 192 /* File has no extents at all! */ 213 193 memset(&eloc, 0x00, sizeof(lb_addr)); 214 194 elen = EXT_NOT_RECORDED_NOT_ALLOCATED | offset; 215 195 udf_add_aext(inode, &bloc, &extoffset, eloc, elen, &bh, 1); 216 196 } 197 else { 198 extoffset -= adsize; 199 etype = udf_next_aext(inode, &bloc, &extoffset, &eloc, &elen, &bh, 1); 200 if (etype == (EXT_NOT_RECORDED_NOT_ALLOCATED >> 30)) 201 { 202 extoffset -= adsize; 203 elen = EXT_NOT_RECORDED_NOT_ALLOCATED | (elen + offset); 204 udf_write_aext(inode, bloc, &extoffset, eloc, elen, bh, 0); 205 } 206 else if (etype == (EXT_NOT_RECORDED_ALLOCATED >> 30)) 207 { 208 lb_addr neloc = { 0, 0 }; 209 extoffset -= adsize; 210 nelen = EXT_NOT_RECORDED_NOT_ALLOCATED | 211 ((elen + offset + inode->i_sb->s_blocksize - 1) & 212 ~(inode->i_sb->s_blocksize - 1)); 213 udf_write_aext(inode, bloc, &extoffset, neloc, nelen, bh, 1); 214 udf_add_aext(inode, &bloc, &extoffset, eloc, (etype << 30) | elen, &bh, 1); 215 } 216 else 217 { 218 if (elen & (inode->i_sb->s_blocksize - 1)) 219 { 220 extoffset -= adsize; 221 elen = EXT_RECORDED_ALLOCATED | 222 ((elen + inode->i_sb->s_blocksize - 1) & 223 ~(inode->i_sb->s_blocksize - 1)); 224 udf_write_aext(inode, bloc, &extoffset, eloc, elen, bh, 1); 225 } 226 memset(&eloc, 0x00, sizeof(lb_addr)); 227 elen = EXT_NOT_RECORDED_NOT_ALLOCATED | offset; 228 udf_add_aext(inode, &bloc, &extoffset, eloc, elen, &bh, 1); 229 } 230 } 217 231 } 218 232 } src/linux/brcm/linux.v24/include/net/sctp/sctp.h
r2846 r3917 411 411 } 412 412 413 /* Calculate the size (in bytes) occupied by the data of an iovec. */414 static inline size_t get_user_iov_size(struct iovec *iov, int iovlen)415 {416 size_t retval = 0;417 418 for (; iovlen > 0; --iovlen) {419 retval += iov->iov_len;420 iov++;421 }422 423 return retval;424 }425 426 413 /* Generate a random jitter in the range of -50% ~ +50% of input RTO. */ 427 414 static inline __s32 sctp_jitter(__u32 rto) src/linux/brcm/linux.v24/include/net/sctp/sm.h
r2726 r3917 222 222 __u32 tsn); 223 223 struct sctp_chunk *sctp_make_abort_user(const struct sctp_association *, 224 const struct sctp_chunk *, 225 const struct msghdr *); 224 const struct msghdr *, size_t msg_len); 226 225 struct sctp_chunk *sctp_make_abort_violation(const struct sctp_association *, 227 226 const struct sctp_chunk *, src/linux/brcm/linux.v24/kernel/ksyms.c
r3658 r3917 582 582 EXPORT_SYMBOL(memchr); 583 583 584 584 585 #ifdef CONFIG_CRC32 585 586 EXPORT_SYMBOL(crc32_le); src/linux/brcm/linux.v24/net/sctp/sm_make_chunk.c
r2726 r3917 799 799 /* Helper to create ABORT with a SCTP_ERROR_USER_ABORT error. */ 800 800 struct sctp_chunk *sctp_make_abort_user(const struct sctp_association *asoc, 801 const struct sctp_chunk *chunk,802 const struct msghdr *msg)801 const struct msghdr *msg, 802 size_t paylen) 803 803 { 804 804 struct sctp_chunk *retval; 805 void *payload = NULL, *payoff; 806 size_t paylen = 0; 807 struct iovec *iov = NULL; 808 int iovlen = 0; 809 810 if (msg) { 811 iov = msg->msg_iov; 812 iovlen = msg->msg_iovlen; 813 paylen = get_user_iov_size(iov, iovlen); 814 } 815 816 retval = sctp_make_abort(asoc, chunk, sizeof(sctp_errhdr_t) + paylen); 805 void *payload = NULL; 806 int err; 807 808 retval = sctp_make_abort(asoc, NULL, sizeof(sctp_errhdr_t) + paylen); 817 809 if (!retval) 818 810 goto err_chunk; … … 820 812 if (paylen) { 821 813 /* Put the msg_iov together into payload. */ 822 payload = kmalloc(paylen, GFP_ ATOMIC);814 payload = kmalloc(paylen, GFP_KERNEL); 823 815 if (!payload) 824 816 goto err_payload; 825 payoff = payload; 826 827 for (; iovlen > 0; --iovlen) { 828 if (copy_from_user(payoff, iov->iov_base,iov->iov_len)) 829 goto err_copy; 830 payoff += iov->iov_len; 831 iov++; 832 } 817 818 err = memcpy_fromiovec(payload, msg->msg_iov, paylen); 819 if (err < 0) 820 goto err_copy; 833 821 } 834 822 src/linux/brcm/linux.v24/net/sctp/sm_statefuns.c
r2846 r3917 3991 3991 * if necessary to fill gaps. 3992 3992 */ 3993 struct msghdr *msg = arg; 3994 struct sctp_chunk *abort; 3993 struct sctp_chunk *abort = arg; 3995 3994 sctp_disposition_t retval; 3996 3995 3997 3996 retval = SCTP_DISPOSITION_CONSUME; 3998 3997 3999 /* Generate ABORT chunk to send the peer. */ 4000 abort = sctp_make_abort_user(asoc, NULL, msg); 4001 if (!abort) 4002 retval = SCTP_DISPOSITION_NOMEM; 4003 else 4004 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); 3998 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); 4005 3999 4006 4000 /* Even if we can't send the ABORT due to low memory delete the … … 4124 4118 sctp_cmd_seq_t *commands) 4125 4119 { 4126 struct msghdr *msg = arg; 4127 struct sctp_chunk *abort; 4120 struct sctp_chunk *abort = arg; 4128 4121 sctp_disposition_t retval; 4129 4122 … … 4133 4126 retval = SCTP_DISPOSITION_CONSUME; 4134 4127 4135 /* Generate ABORT chunk to send the peer */ 4136 abort = sctp_make_abort_user(asoc, NULL, msg); 4137 if (!abort) 4138 retval = SCTP_DISPOSITION_NOMEM; 4139 else 4140 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); 4128 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); 4141 4129 4142 4130 sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE, src/linux/brcm/linux.v24/net/sctp/socket.c
r2726 r3917 968 968 sctp_association_free(asoc); 969 969 970 } else if (sk->linger && !sk->lingertime) 971 sctp_primitive_ABORT(asoc, NULL); 972 else 970 } else if (sk->linger && !sk->lingertime) { 971 struct sctp_chunk *chunk; 972 973 chunk = sctp_make_abort_user(asoc, NULL, 0); 974 if (chunk) 975 sctp_primitive_ABORT(asoc, NULL); 976 } else 973 977 sctp_primitive_SHUTDOWN(asoc, NULL); 974 978 } else … … 1200 1204 } 1201 1205 if (sinfo_flags & MSG_ABORT) { 1206 struct sctp_chunk *chunk; 1207 1208 chunk = sctp_make_abort_user(asoc, msg, msg_len); 1209 if (!chunk) { 1210 err = -ENOMEM; 1211 goto out_unlock; 1212 } 1213 1202 1214 SCTP_DEBUG_PRINTK("Aborting association: %p\n", asoc); 1203 sctp_primitive_ABORT(asoc, msg);1215 sctp_primitive_ABORT(asoc, chunk); 1204 1216 err = 0; 1205 1217 goto out_unlock;
